import request from '@/utils/request'

export default {
  //设置医院列表
  getHospSetList(current,limit,searchObj){
    return request({
      url: `/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
      method: 'post',
      data: searchObj   //使用json传递
    })
  },
  //单个删除
  deleteHospSet(id){
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete',
    })
  },
  //批量删除
  batchHospSet(idLists){
    return request({
      url: `/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data:idLists
    })
  },
  //锁定和取消锁定
  lockHospSet(id,status){
    return request({
      url: `/admin/hosp/hospitalSet/lockHospSet/${id}/${status}`,
      method: 'put',
    })
  },
  //添加医院设置
  saveHospSet(hospitalSet){
    return request({
      url:`/admin/hosp/hospitalSet/saveHospSet`,
      method: 'post',
      data:hospitalSet
    })
  },
  //修改医院设置
  updateHospSet(hospitalSet){
    return request({
      url:`/admin/hosp/hospitalSet/updateHospSet`,
      method: 'put',
      data:hospitalSet
    })
  },
  //根据id查询医院
  getHospSet(id){
    return request({
      url:`/admin/hosp/hospitalSet/getHospSet/${id}`,
      method: 'get',
    })
  }
}
